package com.yYclass.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yYclass.model.ProductDO;
import com.yYclass.mapper.ProductMapper;
import com.yYclass.service.ProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 栗永松
 * @since 2025-01-07
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductDO> implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public ProductDO findDetailById(long productId) {
        return productMapper.selectOne(new QueryWrapper<ProductDO>().eq("product_id", productId));
    }
}
